package MCQReaderInterface;

import java.awt.BorderLayout;

import javax.swing.JFrame;

public class MainInterface extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public MCQReaderMenu getMenu() {
		return menu;
	}

	public void setMenu(MCQReaderMenu menu) {
		this.menu = menu;
	}

	public static MainInterface getThisIsIt() {
		return thisIsIt;
	}

	public static void setThisIsIt(MainInterface thisIsIt) {
		MainInterface.thisIsIt = thisIsIt;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public void setLeftFrame(MCQReaderTools leftFrame) {
		this.leftFrame = leftFrame;
	}

	private MCQReaderMenu menu; // the menu
	private MCQReaderTools leftFrame; // the left side of the frame (buttons,
	// tree, informations)
	private MCQReaderPDF rightFrame; // the left side of the frame (layers and
	// pdf displaying)
	static MainInterface thisIsIt = null;

	public MCQReaderTools getLeftFrame() {
		return leftFrame;
	}

	public MCQReaderPDF getRightFrame() {
		return rightFrame;
	}

	public void setRightFrame(MCQReaderPDF rightFrame) {
		this.rightFrame = rightFrame;
	}

	public MainInterface() {
		menu = new MCQReaderMenu(this);
		setJMenuBar(menu);

		leftFrame = new MCQReaderTools();
		add(leftFrame, BorderLayout.WEST);

		rightFrame = new MCQReaderPDF();
		add(rightFrame);

		setSize(800, 600);
		setLocationRelativeTo(null);
		setTitle("Automatic QCM Analyser");
		setVisible(true);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		thisIsIt = this;
	}

}
